module.exports = config =>{
    
    return (req,res,next)=>{ //定义中间件 定义为通用CRUD接口
        const ModelName = require("inflection").classify(req.params.resource)
        req.Model = require(`../models/${ModelName}`)
        next()
    }
}